import express from 'express'
import orderController from '@/controllers/orderController'

const router = express.Router()

/**
 * 查询订单列表
 * GET /orders
 */
router.get('/', orderController.getOrders)

/**
 * 查询订单详情
 * GET /orders/:outTradeNo
 */
router.get('/:outTradeNo', orderController.getOrderInfo)

/**
 * 创建订单
 * POST /orders
 */
router.post('/', orderController.addOrder)

export default router
